import { request } from "../../utils/request";

/** 登录接口 POST */
export async function loginWxampForWechatCallback(options?: { [key: string]: any }) {
  return request<BaseResponseBean.response<LoginData.LoginVo>>('/login/loginWxampForWechatCallback', {
    method: 'POST',
    data: options || {},
  });
}

/** 绑定账号 POST  */
export async function loginWxampForWechatBindAccount(options?: { [key: string]: any }) {
  return request<BaseResponseBean.response<LoginData.LoginVo>>(
    '/login/loginWxampForWechatBindAccount',
    {
      method: 'POST',
      data: options || {},
    }
  );
}


/** 绑定账号 POST  */
export async function cancelAccount(options?: { [key: string]: any }) {
  return request(
    '/user/account/cancel',
    {
      method: 'POST',
      data: options || {},
    }
  );
}

/** 获取当前的用户 POST  */
export async function currentAccount(options?: { [key: string]: any }) {
  return request<BaseResponseBean.response<AccountData.CurrentAccountVo>>('/login/current', {
    method: 'POST',
    data: options || {},
  });
}

/** 获取组织架构 POST  */
export async function bindAccountOrganization(options?: { [key: string]: any }) {
  return request<BaseResponseBean.response<AccountData.CurrentAccountVo>>('/login/bindAccountOrganization', {
    method: 'POST',
    data: options || {},
  });
}

/** 根据 手机号 获取绑定状态 POST  */
export async function bindAccountQueryByPhone(options?: { [key: string]: any }) {
  return request<BaseResponseBean.response<LoginData.BindAccountQueryByPhoneVo>>('/login/bindAccountQueryByPhone', {
    method: 'POST',
    data: options || {},
  });
}

/** 获取当前用户的首次登录单位列表 POST  */
export async function listSelectLoginOrganization(options?: { [key: string]: any }) {
  return request<BaseResponseBean.response<LoginData.LoginListSelectOrganizationVo[]>>(
    '/login/listSelectLoginOrganization',
    {
      method: 'POST',
      data: options || {},
    },
  );
}

/** 确认登录组织 POST  */
export async function confirmSelectLoginOrganization(options?: { [key: string]: any }) {
  return request<BaseResponseBean.response<LoginData.LoginConfirmSelectLoginOrganizationVo>>('/login/confirmSelectLoginOrganization', {
    method: 'POST',
    data: options || {},
  });
}
